import JSEncrypt from 'jsencrypt'
const rasApi = (data) => {
    const encryptor = new JSEncrypt()
    const publicKey =
    `-----BEGIN PUBLIC KEY-----
    MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDT/aHW/krrkKwvJ+FSAN7+YHxK
    CaG+BGU5UsERXLfhgSlZqRbBGaZWW/Wjy5Hk7gn1Gi5xI4DE3LUrj25lTzrRCFjM
    CIk4WIrPHUPHNXLJA4fj6XXK/m/7Q46IppkKs2TiuIc5iEWvOCof8Id8XBHV2fMO
    NcnBGkAT7crdT8D9mwIDAQAB
    -----END PUBLIC KEY-----`
    encryptor.setPublicKey(publicKey)
    return encryptor.encrypt(data)
}
export { rasApi }